Enforce secure process execution in CI - #390
Merged
Priyanshu Agrawal (priyanshu92) merged 2 commits intoAug 11, 2026
Merged
Conversation
Copilot started reviewing on behalf of
Priyanshu Agrawal (priyanshu92)
August 6, 2026 22:29
View session
Contributor
|
Excellent analyzer implementation and fixture coverage. I found one high-priority scope issue and one medium test-rigor issue. Severity: High
Severity: Medium
Suggested fix:
|
T-Nid (tyaginidhi)
approved these changes
Aug 11, 2026
Copilot started reviewing on behalf of
Priyanshu Agrawal (priyanshu92)
August 11, 2026 07:41
View session
Contributor
There was a problem hiding this comment.
Review details
Suppressed comments (2)
scripts/validate-secure-process-execution.js:883
- This
else ifbranch is mis-indented (the body lines align with the outer scope), which makes the control flow and brace structure hard to verify and easy to break during future edits. Re-indent the branch so its contents are clearly nested under the condition.
scripts/validate-secure-process-execution.js:64 - The directory walker will still recurse through large non-production trees under
plugins/power-pages/skills/**/assetsand.../references(they’re not inEXCLUDED_DIRECTORY_NAMES), even thoughshouldScan()later filters them out. This can add significant CI/runtime overhead and contradicts the stated exclusion of assets/references by path segment rules.
- Files reviewed: 45/45 changed files
- Comments generated: 0 new
- Review effort level: Lite
Copilot started reviewing on behalf of
Priyanshu Agrawal (priyanshu92)
August 11, 2026 08:07
View session
Contributor
There was a problem hiding this comment.
Review details
Suppressed comments (2)
scripts/tests/validate-secure-process-execution.test.js:187
- This assertion makes the test brittle as the repo evolves (file count can legitimately drop below 100, causing unrelated failures). Prefer asserting that the scan includes at least one file from each intended scan root (hooks/scripts/skills scripts).
scripts/validate-secure-process-execution.js:866 - The direct-require computed-member branch in findCalls() has misleading indentation (lines inside the
else ifblock are not indented under the opening brace). This makes the nested control flow hard to audit and easy to introduce mistakes in future edits.
- Files reviewed: 45/45 changed files
- Comments generated: 0 new
- Review effort level: Lite
stack merge was automatically disabled
August 11, 2026 08:41
Pull Request is not mergeable
stack merge was automatically disabled
August 11, 2026 08:43
Pull Request is not mergeable
stack merge was automatically disabled
August 11, 2026 08:44
Pull Request is not mergeable
stack merge was automatically disabled
August 11, 2026 08:45
Pull Request is not mergeable
Priyanshu Agrawal (priyanshu92)
requested review from
T-Nid (tyaginidhi)
and removed request for
T-Nid (tyaginidhi)
August 11, 2026 08:50
gokulraj-g
approved these changes
Aug 11, 2026
stack merge was automatically disabled
August 11, 2026 08:55
Pull Request is not mergeable
stack merge was automatically disabled
August 11, 2026 08:57
Pull Request is not mergeable
Priyanshu Agrawal (priyanshu92)
removed the request for review
from T-Nid (tyaginidhi)
August 11, 2026 08:59
stack merge was automatically disabled
August 11, 2026 09:07
Pull Request is not mergeable
Base automatically changed from
users/priyanshu92/fix-power-pages-shell-security
to
main
August 11, 2026 09:52
- add a dependency-free, fail-closed child_process analyzer\n- cover safe and unsafe syntax with deterministic fixtures\n- run the audit for every pull request with telemetry disabled\n- migrate removable process probes to fixed executable argv calls\n\nCo-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
- remove the Playwright shell:true exception after the hardened launcher landed\n- require repository and CLI audits to report zero exceptions\n- retain exact exception schema and stale-drift coverage\n\nCo-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>\nCopilot-Session: f349adcb-b52e-4060-95aa-b0f4e13841ac
Priyanshu Agrawal (priyanshu92)
force-pushed
the
users/priyanshu92/enforce-secure-process-ci
branch
from
August 11, 2026 09:52
de83376 to
7625953
Compare
amitjoshi438
approved these changes
Aug 11, 2026
Priyanshu Agrawal (priyanshu92)
deleted the
users/priyanshu92/enforce-secure-process-ci
branch
August 11, 2026 10:04
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
exec/execSynccommands, non-fixed executables,shell: true, and ambiguous shell option shapes with file/line diagnosticsAnalyzer scope and limits
The audit scans production
.js,.cjs, and.mjsfiles under Power Pageshooks/,scripts/, and skillscripts/. Tests, fixtures, generated content, vendor content, dependencies, assets, and references are excluded through explicit path-segment rules.The implementation uses a conservative tokenizer and balanced-token call reader because this repository has no root parser dependency. It recognizes CommonJS and ESM imports, aliases, direct/namespace/computed/optional calls, multiline calls, templates, regex literals, local options objects, and common shadowing patterns. It is not a general JavaScript parser: unsupported lexical syntax, unresolved executable/options expressions, spreads, computed keys, and ambiguous child-process shapes fail closed for review.
The current production tree has zero audited exceptions. The exact exception schema and stale-exception drift behavior remain covered by synthetic tests.
CI
The metadata workflow now runs on dependent PR bases as well as
mainand setsPOWER_PLATFORM_SKILLS_TELEMETRY_POWER_PAGES_OPTOUT=1at job level.Commands:
Dependency
This PR is stacked on parent PR #386 and must merge after it. Stack metadata is maintained separately.
users/priyanshu92/fix-power-pages-shell-security27c9c6174f19854847235381f52108a767a77660de8337658ebe5473deefe3b3213a9ad4fdc68ce2Checks
git diff --checkagainst the live parent